Skip to content

Add DATE_HEADER items and UI for date headers in history statistics list#2

Merged
Cellulose-Type-C merged 2 commits intodevfrom
codex/add-date-headers-to-history-screen
Mar 21, 2026
Merged

Add DATE_HEADER items and UI for date headers in history statistics list#2
Cellulose-Type-C merged 2 commits intodevfrom
codex/add-date-headers-to-history-screen

Conversation

@Cellulose-Type-C
Copy link
Owner

Motivation

  • Improve history statistics readability by grouping stream entries by date when sorted by last played.
  • Introduce a dedicated DATE_HEADER local item type so headers can be rendered as full-width list items.

Description

  • Added LocalItem.LocalItemType.DATE_HEADER and a new data class DateHeaderItem that carries a LocalDate value and implements LocalItem.
  • Extended LocalItemListAdapter with a new holder type DATE_HEADER_HOLDER_TYPE, a DateHeaderHolder, view inflation of R.layout.list_date_header_item, binding logic for DateHeaderItem, and span lookup so headers span all columns.
  • Created layout list_date_header_item.xml for the date header TextView and added required imports and resources to the adapter.
  • Updated StatisticsPlaylistFragment.processResult to insert DateHeaderItem entries before each date group when StatisticSortMode is LAST_PLAYED, and adjusted getPlayQueueStartingAt to compute the correct play index while skipping header items.
  • Removed date formatting from the statistic stream detail line in LocalStatisticStreamItemHolder so date rendering is handled by the new header view.

Testing

  • Built the app with ./gradlew assembleDebug which completed successfully.
  • Ran unit tests with ./gradlew test which completed successfully.

Codex Task

@Cellulose-Type-C Cellulose-Type-C merged commit a3a7beb into dev Mar 21, 2026
5 of 6 checks passed
@Cellulose-Type-C Cellulose-Type-C deleted the codex/add-date-headers-to-history-screen branch March 21, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant